<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2025/6/9
  Time: 下午5:01
  To change this template use File | Settings | File Templates.
--%>
<%--<%@ page import="com.shop.model.Student" %>--%>
<%--<%@ page import="com.shop.dao.StudentDAO" %>--%>
<%--<%@ page import="com.shop.service.StudentService" %>&lt;%&ndash;--%>
<%--  Created by IntelliJ IDEA.--%>
<%--  User: Administrator--%>
<%--  Date: 2025/5/16--%>
<%--  Time: 下午10:17--%>
<%--  To change this template use File | Settings | File Templates.--%>
<%--&ndash;%&gt;--%>
<%--<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>--%>
<%--<!DOCTYPE html>--%>
<%--<html>--%>
<%--<head>--%>
<%--    <meta charset="UTF-8">--%>
<%--    <title>个人中心</title>--%>
<%--    <style>--%>
<%--        body {--%>
<%--            font-family: Arial, sans-serif;--%>
<%--            margin: 0;--%>
<%--            padding: 0;--%>
<%--        }--%>
<%--        .container {--%>
<%--            max-width: 800px;--%>
<%--            margin: 0 auto;--%>
<%--            padding: 20px;--%>
<%--        }--%>
<%--        h1 {--%>
<%--            text-align: center;--%>
<%--            margin-bottom: 20px;--%>
<%--        }--%>
<%--        .profile-info {--%>
<%--            margin-bottom: 20px;--%>
<%--        }--%>
<%--        .profile-info label {--%>
<%--            display: block;--%>
<%--            font-weight: bold;--%>
<%--            margin-bottom: 5px;--%>
<%--        }--%>
<%--        .profile-info input {--%>
<%--            width: 100%;--%>
<%--            padding: 5px;--%>
<%--            border: 1px solid #ccc;--%>
<%--            border-radius: 3px;--%>
<%--        }--%>
<%--        .profile-info button {--%>
<%--            display: block;--%>
<%--            width: 100%;--%>
<%--            padding: 10px;--%>
<%--            background-color: #4CAF50;--%>
<%--            color: white;--%>
<%--            border: none;--%>
<%--            border-radius: 3px;--%>
<%--            cursor: pointer;--%>
<%--        }--%>
<%--        .profile-info button:hover {--%>
<%--            background-color: #45a049;--%>
<%--        }--%>
<%--    </style>--%>
<%--</head>--%>
<%--<body>--%>
<%--<%--%>
<%--    StudentService studentService = new StudentService();--%>
<%--    Student student = studentService.search(request.getParameter("studentId"));--%>
<%--%>--%>
<%--<div class="container">--%>
<%--    <h1>个人中心</h1>--%>
<%--    <div class="profile-info">--%>
<%--        <label for="studentId">ID:</label>--%>
<%--        <input type="text" id="studentId" name="studentId" value="<%=student.getStudentId()%>" readonly>--%>
<%--    </div>--%>
<%--    <div class="profile-info">--%>
<%--        <label for="username">用户名:</label>--%>
<%--        <input type="text" id="username" name="username" value="<%=student.getName()%>" readonly>--%>
<%--    </div>--%>
<%--    <div class="profile-info">--%>
<%--        <label for="phone">手机号:</label>--%>
<%--        <input type="text" id="phone" name="phone" value="<%=student.getPhone()%>" readonly>--%>
<%--    </div>--%>
<%--    <div class="profile-info">--%>
<%--        <label for="money">余额:</label>--%>
<%--        <input type="text" id="money" name="money" value="<%=student.getMoney()%>" readonly>--%>
<%--    </div>--%>
<%--    <div class="profile-info">--%>
<%--        <label for="major">专业:</label>--%>
<%--        <input type="text" id="major" name="major" value="<%=student.getMajor()%>" readonly>--%>
<%--    </div>--%>
<%--    <div class="profile-info">--%>
<%--        <label for="identity">身份:</label>--%>
<%--        <input type="text" id="identity" name="identity" value="<%=student.getIdentity()%>" readonly>--%>
<%--    </div>--%>
<%--    <div class="profile-info">--%>
<%--        <label for="age">年龄:</label>--%>
<%--        <input type="text" id="age" name="email" value="<%=student.getAge()%>" readonly>--%>
<%--    </div>--%>
<%--    <div class="profile-info">--%>
<%--        <label for="grade">年级:</label>--%>
<%--        <input type="text" id="grade" name="email" value="<%=student.getGrade()%>" readonly>--%>
<%--    </div>--%>
<%--    <div class="profile-info">--%>
<%--        <button onclick="editProfile()">编辑资料</button>--%>
<%--    </div>--%>

<%--</div>--%>

<%--<script>--%>
<%--    function editProfile() {--%>
<%--        // 跳转到编辑个人资料的页面--%>
<%--        var studentId = document.getElementById("studentId").value;--%>
<%--        window.location.href = "edit_profile.jsp?studentId=" + studentId;--%>
<%--    }--%>
<%--</script>--%>
<%--</body>--%>
<%--</html>--%>



<%@ page import="com.shop.model.Student" %>
<%@ page import="com.shop.service.StudentService" %>
<%@ page import="com.shop.service.IStudentService" %>
<%@ page import="com.shop.service.ITeacherService" %>
<%@ page import="com.shop.service.TeacherService" %>
<%@ page import="com.shop.model.Teacher" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>个人中心</title>
    <style>
        :root {
            --primary-color: #4361ee;
            --secondary-color: #3f37c9;
            --accent-color: #4895ef;
            --light-color: #f8f9fa;
            --dark-color: #212529;
            --success-color: #4cc9f0;
            --danger-color: #f72585;
            --border-radius: 8px;
            --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        body {
            background-color: #f5f7fa;
            color: var(--dark-color);
            line-height: 1.6;
        }

        .container {
            max-width: 800px;
            margin: 2rem auto;
            padding: 2rem;
            background-color: white;
            border-radius: var(--border-radius);
            box-shadow: var(--box-shadow);
        }

        .profile-header {
            text-align: center;
            margin-bottom: 2rem;
            padding-bottom: 1rem;
            border-bottom: 1px solid #eee;
        }

        .profile-header h1 {
            color: var(--primary-color);
            font-size: 2rem;
            margin-bottom: 0.5rem;
        }

        .profile-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 1.5rem;
            margin-bottom: 2rem;
        }

        .profile-field {
            margin-bottom: 1rem;
        }

        .profile-field label {
            display: block;
            font-weight: 600;
            margin-bottom: 0.5rem;
            color: var(--secondary-color);
        }

        .profile-field input {
            width: 100%;
            padding: 0.75rem;
            border: 1px solid #ddd;
            border-radius: var(--border-radius);
            font-size: 1rem;
            transition: border-color 0.3s;
            background-color: var(--light-color);
        }

        .profile-field input:focus {
            outline: none;
            border-color: var(--accent-color);
        }

        .profile-actions {
            display: flex;
            gap: 1rem;
            justify-content: center;
            margin-top: 2rem;
        }

        .btn {
            padding: 0.75rem 1.5rem;
            border: none;
            border-radius: var(--border-radius);
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            text-align: center;
            text-decoration: none;
        }

        .btn-primary {
            background-color: var(--primary-color);
            color: white;
        }

        .btn-primary:hover {
            background-color: var(--secondary-color);
            transform: translateY(-2px);
            box-shadow: var(--box-shadow);
        }

        @media (max-width: 768px) {
            .profile-grid {
                grid-template-columns: 1fr;
            }

            .container {
                padding: 1.5rem;
                margin: 1rem;
            }
        }
    </style>
</head>
<body>
<%
    ITeacherService iTeacherService = new TeacherService();
    Teacher teacher = iTeacherService.search(request.getParameter("teacherId"));
%>
<div class="container">
    <div class="profile-header">
        <h1>个人中心</h1>
        <p>查看和管理您的个人信息</p>
    </div>

    <div class="profile-grid">
        <div class="profile-field">
            <label for="teacherId">工号</label>
            <input type="text" id="teacherId" value="<%=teacher.getTeacherId()%>" readonly>
        </div>

        <div class="profile-field">
            <label for="username">姓名</label>
            <input type="text" id="username" value="<%=teacher.getName()%>" readonly>
        </div>


        <div class="profile-field">
            <label for="major">专业</label>
            <input type="text" id="major" value="<%=teacher.getSubject()%>" readonly>
        </div>

        <div class="profile-field">
            <label for="identity">身份</label>
            <input type="text" id="identity" value="<%=teacher.getIdentity()%>" readonly>
        </div>

    </div>

</div>

</body>
</html>

